
#include "derivative.h" /* include peripheral declarations */
#include "Clocks.h"
#include "uart.h"

unsigned char test[] = "Que pedo";


int main(void)
{
	int counter = 0;
	SIM_COPC= 0; // Turning off Watchdog 
	
	/*External crystal = 8Mhz /256 = 31.25 Khz (in FLL range (31.25 kHz to 39.0625 kHz range))
		 *  PLL Clock = 8Mhz /4 = 2Mhz ( in range 2-4 Mhz for PLL)
		 *   2 Mhz * 24 = 48 Mhz at output
		 * 	48 MHz/1 = 48 Mhz ( for system), 24 Mhz/2 = 12 Mhz ( for bus) 
		 * */
	FEI_to_PEE_Clock_Config(VERY_HIGH, HIGH_GAIN, F256,4,24,1,2);
	UART_Config();
	UART_ConfigBaudRate(9600);

	counter = UART_TRANSMIT_Message(test,sizeof(test));

	for(;;) {	   
	   	counter++; 
	}
	
	return 0;
}
